const request = (funcName, data) => {
	return new Promise((resolve, reject) => {
		uni.showToast({
			title: '正在加载中',
			icon: 'loading'
		})
		uniCloud.callFunction({
			name: funcName,
			data,
			success:(res) => {
				resolve(res)
				console.log('res', res)
			},
			fail:(err) => {
				reject(err)
				console.log('err', err)
			},
			complete: () => {
				uni.hideToast()
			}
		})
	})
}

export {request}